package com.kg.tombs.entitys;

import io.vertx.core.json.JsonObject;
import lombok.Data;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 服装信息
 */
@Data
public class Costume {

    /**
     * 服装ID，唯一标识符
     */
    private Integer costumeId;

    /**
     * 序号
     */
    private String sequence;

    /**
     * 位置
     */
    private String position;

    /**
     * 性别
     */
    private String gender;

    /**
     * 发型
     */
    private String hairstyle;

    /**
     * 服装类型
     */
    private String clothingType;

    /**
     * 袍领样式
     */
    private String robeCollar;

    /**
     * 袍前片样式
     */
    private String robeFront;

    /**
     * 袍袖样式
     */
    private String robeSleeve;

    /**
     * 腰部装饰
     */
    private String waistDecoration;

    /**
     * 颜色图案
     */
    private String colorPattern;

    /**
     * 其他细节信息
     */
    private String otherDetails;

    /**
     * 裤装/裙装
     */
    private String trousersSkirt;

    /**
     * 鞋靴
     */
    private String shoesBoots;

    /**
     * 墓葬名称
     */
    private String tombName;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

    public Costume(String sequence, String position, String gender, String hairstyle, String clothingType, String robeCollar, String robeFront, String robeSleeve, String waistDecoration, String colorPattern, String otherDetails, String trousersSkirt, String shoesBoots, String tombName, LocalDateTime createdAt, LocalDateTime updatedAt) {
        this.sequence = sequence;
        this.position = position;
        this.gender = gender;
        this.hairstyle = hairstyle;
        this.clothingType = clothingType;
        this.robeCollar = robeCollar;
        this.robeFront = robeFront;
        this.robeSleeve = robeSleeve;
        this.waistDecoration = waistDecoration;
        this.colorPattern = colorPattern;
        this.otherDetails = otherDetails;
        this.trousersSkirt = trousersSkirt;
        this.shoesBoots = shoesBoots;
        this.tombName = tombName;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }

    public JsonObject toJson() {
        return new JsonObject()
                .put("sequence", sequence)
                .put("position", position)
                .put("gender", gender)
                .put("hairstyle", hairstyle)
                .put("clothingType", clothingType)
                .put("robeCollar", robeCollar)
                .put("robeFront", robeFront)
                .put("robeSleeve", robeSleeve)
                .put("waistDecoration", waistDecoration)
                .put("colorPattern", colorPattern)
                .put("otherDetails", otherDetails)
                .put("trousersSkirt", trousersSkirt)
                .put("shoesBoots", shoesBoots)
                .put("tombName", tombName)
                .put("createdAt", createdAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))
                .put("updatedAt", updatedAt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));

    }

}
